<?php
namespace App\Models\Pdf;

use Illuminate\Database\Eloquent\Model;
use Dcat\Admin\Traits\HasDateTimeFormatter;
use Illuminate\Database\Eloquent\Relations;
use App\Models\Category\Category;
use App\Models\Data\ClickLearn;

class TextbookRead extends Model
{
    use HasDateTimeFormatter;

    protected $table = 'textbook_reads';
    protected $fillable = ['category_id', 'click_learn_id', 'page', 'sort'];

    public function category(): Relations\BelongsTo
    {
        return $this->belongsTo(Category::class);
    }

    public function click_learn(): Relations\BelongsTo
    {
        return $this->belongsTo(ClickLearn::class);
    }
}
